<script setup>
import { inject } from "vue";

const xd = inject("xd");
</script>

<template>
  <h2>子组件</h2>
  <span @click="xd++">{{ xd }}</span>
</template>
